# Project needs a name ofcourse
project(plasma-nazar)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)

# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
find_package(MSGFMT REQUIRED)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
   ${CMAKE_SOURCE_DIR}
   ${CMAKE_BINARY_DIR}
   ${KDE4_INCLUDES}
   ${QT_INCLUDES}
   )

add_subdirectory(translations)

# We add our source code here
set(nazar_SRCS nazar.cpp)

kde4_add_ui_files(nazar_SRCS nazarConfig.ui)

# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_nazar ${nazar_SRCS})

target_link_libraries(plasma_applet_nazar 
                      ${KDE4_PLASMA_LIBS}  ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
 
install(TARGETS plasma_applet_nazar
        DESTINATION ${PLUGIN_INSTALL_DIR})
 
install(FILES plasma-applet-nazar.desktop
        DESTINATION ${SERVICES_INSTALL_DIR})

install(FILES beads/boncuk-01.svg beads/boncuk-02.svg beads/boncuk-03.svg beads/boncuk-04.svg
        beads/boncuk-05.svg beads/boncuk-06.svg
        DESTINATION ${DATA_INSTALL_DIR}/nazar/)

kde4_install_icons(${ICON_INSTALL_DIR})
